You are here: Trading System Programming > Reference > Classes > Order > Order Methods > getSymbol

getSymbol

The getSymbol method returns order's symbol.

Syntax

var getSymbol();

Return Value

This method returns symbol as a string value.

Example

The following example demonstrates the use of getSymbol() method.

 

function start()

{

//retrieve account's open orders

var account = getAccount();

var openOrders = account.getOrders();

 

//loop through all orders

for(var i = 0; i < openOrders.length, i++)

{

var order = openOrders[i];

 

//only process orders which match current symbol

if(order.getSymbol() == this.getSymbol())

{

//proceed...

 

}

}

 

//proceed further...

}

 


Copyright © 2006-2009 ActiveTick LLC